package Work0511;

import java.util.Scanner;

public class CompanyTest {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String a = "安徽黑猪软件开发公司";
		String b = "淝南家园北区";
		long c = 17766694666L;
		String d = "承包网站制作,开发软件、APP等项目";
		Company test = new Company(a, b, c, d);
		test.show();
		while (true) {
			System.out.println("1.招聘员工2.输出员工信息3.辞退员工4.统计公司人数5.查找最高工资的员工6.退出");
			System.out.print("请选择:");
			int e = in.nextInt();
			if (e == 1) {
				System.out.print("请输入员工的姓名:");
				String f = in.next();
				System.out.print("请输入员工的年龄:");
				int g = in.nextInt();
				System.out.print("请输入员工的性别:");
				String h = in.next();
				System.out.print("请输入员工的职务:");
				String i = in.next();
				System.out.print("请输入员工的薪水:");
				double j = in.nextDouble();
				boolean k = test.addStaff(f, g, h, i, j);
				System.out.println(k ? "招聘成功" : "重复招聘,招聘失败");
				System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
			} else if (e == 2) {
				test.showStaff();
				System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
			} else if (e == 3) {
				System.out.print("请输入要辞退的员工姓名:");
				String l = in.next();
				boolean m = test.rufuseStaff(l);
				System.out.println(m ? "辞退成功" : "未找到该员工,请重新输入");
				System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
			} else if (e == 4) {
				System.out.print("正在统计中:");
				test.statisticsStaff();
				System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
			} else if (e == 5) {
				test.findTopSalary();
			} else if (e == 6) {
				break;
			}
		}
	}

}
